/**
  ETFRoot project, Anyang Normal University && IMP-CAS
  \class ETFDCTaL
  \brief a specification of ETFDCTa, with larger drift cells (10mm)
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2022-04-25
  \date 2022-04-25 last modified
  \attention
  changelog
  <table>
  <tr>  <th>Date         <th>Author      <th>Description                   </tr>
  <tr>  <td>2022-04-25   <td>Asia Sun    <td>file created                  </tr>
  </table>

  \copyright Copyright (c) 2021 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#ifndef ETFDCTaL_h
#define ETFDCTaL_h

#include "ETFDCTa.h"

class ETFDCTaL : public ETFDCTa{
public:
  ETFDCTaL(){}
  ETFDCTaL(const char *name);
  virtual ~ETFDCTaL();

  virtual void Assign(const ETFHPTDCChannel *ch); ///< add the data channel to the detector
  virtual void ConstructGraph(); ///< add sigle wires to fGDumb
  /// \retval false: if obtained drift time out of range
  /// NOTE that if trk has non-FitStatus::kUNFITTED FitStatus, this method
  /// would do nothing, as drift distance only changes with drift time,
  /// whose changes would ensure fFitStatus be set to FitStatus::kUNFITTED
  virtual bool SetDriftDistance(ETFVTrack *trk);

  /// r = r(t); drift distance - drift time relation
  virtual double SpaceTimeRelation(double t);

  ClassDef(ETFDCTaL, 1);

protected:
  /// \param wireId: 0-40 (both x1 and x2), along x increasing direction
  /// \param type: 0-1: X-Y
  virtual void FillXYChMap(int chId0); ///< fill the channel map for X or Y wires
  /// \param wireId: 0-16 (or 32) (both x1 and x2), along x increasing direction
  /// \param type: 0-1: X-Y
  virtual void AddHit(const ETFHPTDCChannel *ch, int wireId, DCType xy);
};

#endif
